package com.example.booksales.service.impl;

import com.example.booksales.domain.Order;
import com.example.booksales.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServicelmpl implements OrderService{
    @Autowired
    OrderMapper orderMapper;
    @Override
    public List<Order> getAllOrders() {
        return orderMapper.getAllOrders();
    }
    @Override
    public Order selectOrderById(Long orderid) {
        return orderMapper.selectOrderById(orderid);
    }
    @Override
    public int insertOrder(Order order){
        return orderMapper.insertOrder(order);
    }
    @Override
    public int updateOrder(Order order){
        return orderMapper.updateOrder(order);
    }
    @Override
    public int deleteOrderById(Long orderid){
        return orderMapper.deleteOrderById(orderid);
    }
}
